<?php

// AudioShout 0.1.0 Alpha
// Upload progress checking. Requires APC 3.1.10 or higher.
// Unused in this version of the program, just left here in case it may be used in a future release.

if (isset($_GET['key'])) {

    // Fetch the upload progress data
    $status = uploadprogress_get_info($_GET['key']);

    if ($status) {

        // Calculate the current percentage
        echo round($status['bytes_uploaded']/$status['bytes_total']*100);

    }
    else {

        // If there is no data, assume it's done
        echo 100;

    }
}
?>